www.gusucode.com > matlab用户界面的卡尔曼滤波程序 > Kalman filter_GUI\m_files\verify1_callback.m

    function verify1_callback
prompt={'Output Components:'};
title='Verify Components';
lines=1;
def={'1...2'};
answer=inputdlg(prompt,title,lines,def);

v=intfromstr_dot(answer{1});
l=length(v);
j=0;i=1;
while i<=l & v(i)==-1
    i=i+1;
end
while i<l 
    if v(i)~=-1 & v(i+1)~=-1
        j=j+1;
        t(j)=v(i);
        i=i+1;
    elseif v(i)~=-1 & v(i+1)==-1 & v(i+2)~=-1
        if v(i)<=v(i+2)
            temp=v(i);
            while temp<=v(i+2)
                j=j+1;
                t(j)=temp;
                temp=temp+1;
            end
        end
        i=i+3;
    else 
        i=i+1;
    end
end
if i==l 
    if v(i)~=-1
        j=j+1;
        t(j)=v(i);
    end
end

set(gcbo,'userdata',t');%t is the output components.